package com.yuzi.project.service.impl.inner;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yuzi.common.entity.InterfaceInfo;
import com.yuzi.common.service.inner.InnerInterfaceInfoService;
import com.yuzi.project.mapper.InterfaceInfoMapper;
import org.apache.dubbo.config.annotation.DubboService;
import javax.annotation.Resource;

@DubboService
public class InnerInterfaceInfoServiceImpl implements InnerInterfaceInfoService {
    @Resource
    private InterfaceInfoMapper interfaceInfoMapper;

    @Override
    public InterfaceInfo getInterfaceInfo(String url, String methodName) {
        QueryWrapper<InterfaceInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("method",methodName);
        queryWrapper.eq("url",url);
        return interfaceInfoMapper.selectOne(queryWrapper);
    }
}
